package com.zt.ztzx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zt.ztzx.model.entity.product.TTask;
import com.zt.ztzx.model.vo.common.Result;
import com.zt.ztzx.model.vo.product.TaskVo;
import com.zt.ztzx.service.TTaskService;
import com.zt.ztzx.mapper.TTaskMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 16236
* @description 针对表【t_task】的数据库操作Service实现
* @createDate 2024-09-20 10:02:50
*/
@Service
public class TTaskServiceImpl extends ServiceImpl<TTaskMapper, TTask>
    implements TTaskService{

    @Autowired
    private TTaskMapper tTaskMapper;

    @Override
    public Result<PageInfo<TaskVo>> findAll(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<TaskVo> list = tTaskMapper.findAll();
        PageInfo<TaskVo> pageInfo = new PageInfo<>(list);
        return Result.build(pageInfo, 200,"查询成功");
    }
}




